#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int a = 0;
	int n = 0;
	int i = 0;
	int tmp = 0;
	int sun = 0;
	scanf("%d %d", &a, &n);
	for(i=0;i<n;i++)
	{
		tmp = tmp * 10 + a;
		sun +=tmp;
	}
	printf("%d", sun);
	return 0;
}

